package com.dd.cloud.user.entity.mechan;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 机构层级表
 * </p>
 *
 * @author czg
 * @since 2022-04-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Table(comment = "机构表")
public class MechanRank implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 机构层级表
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true, isAutoIncrement = true)
    private Integer id;

    /**
     * 机构全局id
     */
    @Column(length = 40, comment = "机构全局id,uuid")
    private String globalId;

    /**
     * 龙头机构id
     */
    @Column(comment = "龙头机构id")
    private Integer tapId;

    /**
     * 机构类型 待用
     */
    @Column(type = MySqlTypeConstant.TINYINT, comment = "机构类型 待用")
    private Integer type;

    /**
     * 机构名称
     */
    @Column(length = 20, comment = "机构类型")
    private String rankType;

    /**
     * 机构名称
     */
    @Column(length = 20, comment = "机构名称")
    private String name;

    /**
     * 机构管理员-负责人邮箱
     */
    @Column(length = 50, comment = "负责人邮箱")
    private String adminEmail;

    /**
     * 机构管理员-负责人电话
     */
    @Column(length = 11, comment = "负责人电话")
    private String adminPhone;

    /**
     * 机构管理员-负责人名字
     */
    @Column(length = 20, comment = "负责人名字")
    private String adminName;

    /**
     * 机构管理员-负责人身份证
     */
    @Column(length = 20, comment = "负责人身份证")
    private String adminIdCard;

    /**
     * 省份
     */
    @Column(length = 20, comment = "省份")
    private String province;

    /**
     * 城市
     */
    @Column(length = 20, comment = "城市")
    private String city;

    /**
     * 区县
     */
    @Column(length = 20, comment = "区县")
    private String district;

    /**
     * 机构地址
     */
    @Column(length = 100, comment = "机构地址")
    private String addr;

    /**
     * 位置经度
     */
    @Column(length = 50, comment = "位置经度")
    private String lng;

    /**
     * 位置纬度
     */
    @Column(length = 50, comment = "位置纬度")
    private String lat;

    /**
     * 机构简介
     */
    @Column(length = 100, comment = "机构简介")
    private String introduction;

    /**
     * 处方数
     */
    @Column(comment = "处方数")
    private Integer limitNum;

    /**
     * 处方数类型
     */
    @Column(type = MySqlTypeConstant.TINYINT, comment = "处方数类型")
    private Integer limitType;

    /**
     * 医生数
     */
    @Column(comment = "医生数")
    private Integer doctorCount;

    /**
     * 状态 1正常 2禁用 -1删除
     */
    @Column(type = MySqlTypeConstant.TINYINT, comment = "状态 1正常 2禁用 -1删除")
    private Integer status;

    /**
     * 创建日期
     */
    @Column(comment = "创建日期", defaultValue = "now()")
    private LocalDateTime createDate;

    /**
     * 更新日期
     */
    @Column(comment = "更新日期", defaultValue = "now()")
    private LocalDateTime updateDate;

    /**
     * 有效日期
     */
    @Column(comment = "有效日期")
    private LocalDateTime termDate;

    /**
     * 营业执行图片
     */
    @Column(length = 200, comment = "营业执行图片")
    private String businessLicensePhoto;

    /**
     * 营业执行图片
     */
    @Column(length = 200, comment = "营业执行图片")
    private String legalIdcardPhoto;

    /**
     * 创建人名字
     */
    @Column(length = 20, comment = "创建人名字")
    private String createName;

    /**
     * 创建人id
     */
    @Column(comment = "创建人id")
    private Integer createId;

    /**
     * 创建人类型
     */
    @Column(comment = "创建人类型")
    private Integer createType;

    /**
     * 机构id
     */
    @Column(length = 32, comment = "机构id")
    private String mchId;

    /**
     * 机构秘钥
     */
    @Column(length = 32, comment = "机构秘钥")
    private String secretKey;
}
